package com.ysh.smartplatform.pojo;

import com.ysh.smartplatform.constans.ResultCode;
import com.ysh.smartplatform.valigroup.Insert;
import com.ysh.smartplatform.valigroup.Update;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 袁胜虎 on 2022/9/8 11:38
 */
//Serializable:作用是实现序列化。 序列化：对象的寿命通常随着生成该对象的程序的终止而终止，有时候需要把在内存中的各种对象的状态（也就是实例变量，不是方法）保存下来，并且可以在需要时再将对象恢复。
public class Scene implements Serializable {
    @NotEmpty(message = "{\"code\": "+ ResultCode.PARAM_CONTENT_EMPTY +",\"msg\": \"必须传递id\"}", groups = {Update.class})
    private Long sceneId;

    @NotEmpty(message = "{\"code\": "+ ResultCode.PARAM_CONTENT_EMPTY +",\"msg\": \"必须传递场景名称\"}", groups = {Insert.class, Update.class})
    private String sceneName;

    private Long createBy;

    private Date createTime;

    private Short status;

    private static final long serialVersionUID = 1L;

    public Long getSceneId() {
        return sceneId;
    }

    public void setSceneId(Long sceneId) {
        this.sceneId = sceneId;
    }

    public String getSceneName() {
        return sceneName;
    }

    public void setSceneName(String sceneName) {
        this.sceneName = sceneName;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }
}
